package com.youzhi.backend.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.youzhi.backend.request.*;

public interface IWorkflowService {

    /**
     * 查询部署的记录
     *
     * @param request
     * @return
     */
    IPage processesDeploymentPage(ProcessesDeploymentPageRequest request);


    /**
     * 删除流程部署
     *
     * @param request
     */
    void deleteDeployment(DeleteDeploymentRequest request);


    /**
     * 查询流程分页记录
     *
     * @param request
     * @return
     */
    IPage processesDefinitionPage(ProcessesDefinitionPageRequest request);


    /**
     * 查询正在运行的工作流实例
     *
     * @param request
     * @return
     */
    IPage processesInstancePage(ProcessesInstancePageRequest request);


    /**
     * 已结束的历史流程实例查询
     *
     * @param request
     * @return
     */
    IPage historyProcessesInstancePage(HistoryProcessesInstancePageRequest request);


    /**
     * 开启工作流实例
     *
     * @param processDefinitionKey
     */
    void startProcessInstance(String processDefinitionKey);


    /**
     * 删除工作流实例
     *
     * @param request
     */
    void deleteProcessInstance(DeleteProcessInstanceRequest request);


    /**
     * 暂停（取消暂停）工作流实例
     *
     * @param request
     */
    void suspendProcessInstance(SuspendProcessInstanceRequest request);


    /**
     * 删除历史工作流
     *
     * @param processInstanceId
     */
    void deleteHistoryProcessInstance(String processInstanceId);


}
